import {Component, Input, OnInit} from "@angular/core";
import {UserGroup} from "@shared/models/UserInfo";

@Component({
  selector: 'bby-add-user-to-group',
  template:
    `
      将用户添加到用户组：
      <nz-select [(ngModel)]="selectedValue">
        <nz-option *ngFor="let group of groups" [nzLabel]="group.name" [nzValue]="group.id"></nz-option>
      </nz-select>
    `
})
export class AddUserToGroup implements OnInit{
  @Input()
  groups:UserGroup[]=[]
  @Input()
  userId:string=''
  selectedValue='';

  ngOnInit(): void {
    this.selectedValue=this.groups[0].id
  }

}
